package com.neusoft.demo9;

import java.io.IOException;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ExceptionDemo4 {
    public void m1() throws SQLException {
        DriverManager.getConnection("","","");
    }
    public static void main(String[] args) {
        ExceptionDemo4 demo4 = new ExceptionDemo4();
        try {
            demo4.m1();
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }
        //调用DriverManager类中的getConnection方法
        //        try {
        //            DriverManager.getConnection("","","");
        //        } catch (SQLException e) {
        //            throw new RuntimeException(e);
        //        }

    }
}
